
class HttpException extends Error {
  constructor(msg="服务器错误", errorCode=10001, code=400) {
    super();
    this.msg = msg;
    this.errorCode = errorCode;
    this.code = code
  }
}

class ParameterException extends HttpException {
  constructor(msg="资源为找到", errorCode=10000) {
    super();
    this.msg = msg;
    this.errorCode = errorCode;
    this.code = 400
  }
}

module.exports = {
  HttpException,
  ParameterException
};